package com.lyx.bank.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyx.bank.entity.Account;
import com.lyx.bank.mapper.AccountMapper;
import com.lyx.bank.service.AccountService;
import org.springframework.stereotype.Service;

/**
 * @ClassName AccountServiceImpl
 * @Description: TODO
 * @Author 86152
 * @Date 2022/4/22
 * @Version V1.0
 **/
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper,Account> implements AccountService {

    @Override
    public Account login(String cardNo) {
        return this.baseMapper.login(cardNo);
    }

    @Override
    public int updatePass(String cardNo, String pass) {
        return this.baseMapper.updatePass(cardNo,pass);
    }


    @Override
    public int transaction(String cardNo, Double tranMoney) {
        System.out.println("用户+"+cardNo+"收到"+tranMoney);

      return this.baseMapper.transaction(cardNo, tranMoney);
    }

    @Override
    public int transfer(String cardNo, Double tranMoney) {
        System.out.println("用户+"+cardNo+"转出"+tranMoney);
       return this.baseMapper.transfer(cardNo, tranMoney);
    }

}
